<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>公众号文章列表</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        function page(n,s){
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/oa/OfficialAccounts">所有文章</a></li>
    <li ><a href="${ctx}/oa/OfficialAccounts/form">创建文章</a></li>
</ul>
<form:form id="searchForm" modelAttribute="accounts" action="${ctx}/oa/OfficialAccounts/list" method="post" class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>

    <div style="margin-top:8px;">
        <label>创建时间：</label>
        <input id="createDateStart"  name="createDateStart"  type="text" readonly="readonly" maxlength="20" class="input-medium Wdate" style="width:163px;"
               value="<fmt:formatDate value="${OfficialAccounts.createDateStart}" pattern="yyyy-MM-dd"/>"
               onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
        　--　
        <input id="createDateEnd" name="createDateEnd" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate" style="width:163px;"
               value="<fmt:formatDate value="${OfficialAccounts.createDateEnd}" pattern="yyyy-MM-dd"/>"
               onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
        &nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
    </div>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead><tr>
        <th>公众号编号</th>
        <th>标题</th>
        <th>作者</th>
        <th>创建时间</th>
        <th>更新时间</th>
        <th>类型</th>
        <th>操作</th>
    </tr></thead>
    <tbody>
    <c:forEach items="${page.list}" var="oaOfficicalAccounts">

        <tr>
            <td>${oaOfficicalAccounts.id}</td>
            <td>${oaOfficicalAccounts.title}</td>
            <td>${oaOfficicalAccounts.createBy.name}</td>
            <td><fmt:formatDate value="${oaOfficicalAccounts.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
            <td><fmt:formatDate value="${oaOfficicalAccounts.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
            <td>${oaOfficicalAccounts.type}</td>
            <td><a target="_blank" href="${ctx}/oa/OfficialAccounts/form/${oaOfficicalAccounts.id}">查看</a></td>

        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>
